package com.yilin.tms.core.entity.order.party;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.annotation.Explain;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 变更收货地址记录
 */
@Entity
@Table(name = "party_receipt_change_record")
@TableName(value = "party_receipt_change_record")
public class ReceiptChangeRecord extends BaseEntity {

    public enum ChangeState{
        applying(0,"申请中"),
        agreed(1,"已同意"),
        refused(2,"已拒绝"),
        required(3,"必须同意");
        @EnumValue
        public Integer index;
        public String name;

        ChangeState(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    @Column(name = "change_state")
    private ChangeState changeState;//状态

    @Column(name = "transit_order_id")
    private String transitOrderId;//运单
    @Column(name = "transit_order_note_id")
    private String transitOrderNoteId;//节点
    @Column(name = "from_account_id")
    private String fromAccountId;  //操作人
    @Column(name = "from_name")
    private String fromName;  //操作人名称

    @Column(name = "agree_account_id")
    private String agreeAccountId;  //同意操作人
    @Column(name = "agree_name")
    private String agreeName;  //同意操作人名称

    @Column(name = "deal_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dealTime = new Date();

    @Explain("原收货城市")
    @Column(name = "original_consignee_area")
    private String originalConsigneeArea;
    @Explain("原收货联系人")
    @Column(name = "original_consignee_name")
    private String originalConsigneeName;
    @Explain("原收货联系人方式")
    @Column(name = "original_consignee_phone")
    private String originalConsigneePhone;
    @Explain("原收货坐标")
    @Column(name = "original_consignee_coordinate")
    private String originalConsigneeCoordinate;
    @Explain("原收货地址描述")
    @Column(name = "original_consignee_address")
    private String originalConsigneeAddress;
    @Explain("原收货区域码")
    @Column(name = "original_consignee_ad_code")
    private String originalConsigneeAdCode;

    @Explain("收货城市")
    @Column(name = "consignee_area")
    private String consigneeArea;
    @Explain("收货联系人")
    @Column(name = "consignee_name")
    private String consigneeName;
    @Explain("收货联系人方式")
    @Column(name = "consignee_phone")
    private String consigneePhone;
    @Explain("收货坐标")
    @Column(name = "consignee_coordinate")
    private String consigneeCoordinate;
    @Explain("收货地址描述")
    @Column(name = "consignee_address")
    private String consigneeAddress;
    @Explain("收货区域码")
    @Column(name = "consignee_ad_code")
    private String consigneeAdCode;

    public ChangeState getChangeState() {
        return changeState;
    }

    public void setChangeState(ChangeState changeState) {
        this.changeState = changeState;
    }

    public String getOriginalConsigneeArea() {
        return originalConsigneeArea;
    }

    public void setOriginalConsigneeArea(String originalConsigneeArea) {
        this.originalConsigneeArea = originalConsigneeArea;
    }

    public String getOriginalConsigneeName() {
        return originalConsigneeName;
    }

    public void setOriginalConsigneeName(String originalConsigneeName) {
        this.originalConsigneeName = originalConsigneeName;
    }

    public String getOriginalConsigneePhone() {
        return originalConsigneePhone;
    }

    public void setOriginalConsigneePhone(String originalConsigneePhone) {
        this.originalConsigneePhone = originalConsigneePhone;
    }

    public String getOriginalConsigneeCoordinate() {
        return originalConsigneeCoordinate;
    }

    public void setOriginalConsigneeCoordinate(String originalConsigneeCoordinate) {
        this.originalConsigneeCoordinate = originalConsigneeCoordinate;
    }

    public String getOriginalConsigneeAddress() {
        return originalConsigneeAddress;
    }

    public void setOriginalConsigneeAddress(String originalConsigneeAddress) {
        this.originalConsigneeAddress = originalConsigneeAddress;
    }

    public String getOriginalConsigneeAdCode() {
        return originalConsigneeAdCode;
    }

    public void setOriginalConsigneeAdCode(String originalConsigneeAdCode) {
        this.originalConsigneeAdCode = originalConsigneeAdCode;
    }

    public String getTransitOrderNoteId() {
        return transitOrderNoteId;
    }

    public void setTransitOrderNoteId(String transitOrderNoteId) {
        this.transitOrderNoteId = transitOrderNoteId;
    }

    public String getTransitOrderId() {
        return transitOrderId;
    }

    public void setTransitOrderId(String transitOrderId) {
        this.transitOrderId = transitOrderId;
    }

    public String getFromAccountId() {
        return fromAccountId;
    }

    public void setFromAccountId(String fromAccountId) {
        this.fromAccountId = fromAccountId;
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public String getAgreeAccountId() {
        return agreeAccountId;
    }

    public void setAgreeAccountId(String agreeAccountId) {
        this.agreeAccountId = agreeAccountId;
    }

    public String getAgreeName() {
        return agreeName;
    }

    public void setAgreeName(String agreeName) {
        this.agreeName = agreeName;
    }

    public Date getDealTime() {
        return dealTime;
    }

    public void setDealTime(Date dealTime) {
        this.dealTime = dealTime;
    }

    public String getConsigneeArea() {
        return consigneeArea;
    }

    public void setConsigneeArea(String consigneeArea) {
        this.consigneeArea = consigneeArea;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneePhone() {
        return consigneePhone;
    }

    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }

    public String getConsigneeCoordinate() {
        return consigneeCoordinate;
    }

    public void setConsigneeCoordinate(String consigneeCoordinate) {
        this.consigneeCoordinate = consigneeCoordinate;
    }

    public String getConsigneeAddress() {
        return consigneeAddress;
    }

    public void setConsigneeAddress(String consigneeAddress) {
        this.consigneeAddress = consigneeAddress;
    }

    public String getConsigneeAdCode() {
        return consigneeAdCode;
    }

    public void setConsigneeAdCode(String consigneeAdCode) {
        this.consigneeAdCode = consigneeAdCode;
    }
}
